﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ex03
{
    /// <summary>
    /// 问题：如何让C#语言像数据库一样的方式来查询数据集合
    /// 解决方案：引入Linq技术
    /// </summary>
    class Program
    {
        static void Main(string[] args)
        {
            //名字长度大于4个字母
            var people = new[] {"Tom","Flick","John"};
            var result = people.Where(n=>n.Length>=4);
            //找出大于6的整数
            var ints = new int[] {12,4,7,8,6,9};
            var result2 = from n in ints
                where n > 6
                select n;
            Console.ReadKey();
        }
    }
}
